home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-05 | 835 b | 35 lines | [TEXT/MPS ] |
- #
- # File: MouseChaos.vu
- #
- # Contains: A very simple VU script that illustrates the use of the system tasks
- # random(), and mouseSpeed(). Simply run it against any target machine.
- #
- # Conventions: Global variables begin with a capital letter
- #
- # Written by: Jay Jessen
- #
- # Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
- #
- # Change History:
- #
- # 5/17/90 JAS Create globals Number_of_moves and Max_mouse_speed. A few small
- # changes in comment header.
- #
- # 11/7/89 Jay creation
- #
- # To Do:
- #
-
- Number_of_moves := 20;
- Max_mouse_speed := 20;
-
- match[screen m:true r:?Screen_rect]!;
- X_hi := Screen_rect[3];
- Y_hi := Screen_rect[4];
- for i := 1 to Number_of_moves begin
- mouseSpeed(random(0,Max_mouse_speed));
- x := random(,X_hi);
- y := random(,Y_hi);
- println '(',X,',',Y,')';
- move absolute: { X,Y };
- end;